  
class User {
  site = "后盾人"; // 属性site
  sayHello2 = function() {
    console.log('sayHello')
  }
  constructor(name) {
    var a = "bb" // 构造方法的局部变量
    this.name = name; // 属性name,
  }
  // 定义方法，挂载在原型上
  show() {
    console.log(this.site + ":" + this.name);
  }

  sayHello() {
    console.log('原型上的sayHello')
  }
  
}
let hd = new User("向军")

 
console.log(hd)

hd.show();
hd.sayHello();

for(var i in hd) {
  console.log(i)
}

console.log('-----------------------\n')
console.log(Object.getOwnPropertyDescriptors(hd))
console.log(Object.getOwnPropertyDescriptors(Object.getPrototypeOf(hd)))



